<?php
	include(ROOTPATH .'include'. DS .'protect.php');	
	include ROOTPATH .'include'. DS .'isMyQuery.php';
	if( getQuery('commentType') != 'judge')
		include(ROOTPATH .'include'. DS .'checkUserLogin.php');
	else
		include(ROOTPATH .'include'. DS .'initUser.php');
	include ROOTPATH .'class'. DS .'comment.class.php';
	//$id = 0;
	
	$do				= getQuery('do');
	$parent_id		= getId('parent_id');
	$comment_id		= getId('comment_id');	
	$content		= getQuery('msg');
	$commentDelType	= getQuery('commentDelType');
	
	$user_name		= $encrypt -> recode(getQuery('user_name'));
	$task_id		= getId('task_id');
	
	$comment 		= new comment();
	
	

switch($do){
	case 'add'	: $comment -> add( $parent_id,$content,$user_name,&$task_id);
	break ;
	
	case 'del'	: $comment -> del( $parent_id,$comment_id,$commentDelType);
	break ;

}	
		
	
?>